import request from '@/utils/request'

// 查询错题本列表
export function listUserBook(query) {
  return request({
    url: '/business/userBook/list',
    method: 'get',
    params: query
  })
}

// 查询错题本所有列表
export function listAllUserBook(query) {
  return request({
    url: '/business/userBook/listAll',
    method: 'get',
    params: query
  })
}

// 查询错题本详细
export function getUserBook(id) {
  return request({
    url: '/business/userBook/getInfo/' + id,
    method: 'get'
  })
}

// 新增错题本
export function addUserBook(data) {
  return request({
    url: '/business/userBook/add',
    method: 'post',
    data: data
  })
}

// 修改错题本
export function updateUserBook(data) {
  return request({
    url: '/business/userBook/edit',
    method: 'post',
    data: data
  })
}

// 删除错题本
export function delUserBook(id) {
  return request({
    url: '/business/userBook/remove/' + id,
    method: 'get'
  })
}
